import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import News from '../views/News.vue'
import Sports from '../views/Sports.vue'

import One from '../views/Child/One.vue'
import Two from '../views/Child/Two.vue'
import Three from '../views/Child/Three.vue'
Vue.use(VueRouter)

const routes = [{
        path: "/",
        redirect: "/home"
    }, {
        path: "/home",
        component: Home
    },
    {
        path: "/news",
        component: News
    },
    {
        path: "/sports",
        component: Sports,
        children: [{
            path: "/",
            redirect: "/sports/one"
        }, {
            path: "one",
            component: One
        }, {
            path: "two",
            component: Two
        }, {
            path: "three",
            component: Three
        }]
    }
]
const router = new VueRouter({
    routes
})
export default router